Skip to content

Fix Trino REGEXP_REPLACE backreference syntax#837

Merged
rschu1ze merged 1 commit intoClickHouse:mainfrom
piotrrzysko:fix-trino-regexp_replace
May 4, 2026
Merged

Fix Trino REGEXP_REPLACE backreference syntax#837
rschu1ze merged 1 commit intoClickHouse:mainfrom
piotrrzysko:fix-trino-regexp_replace

Conversation

@piotrrzysko
Copy link
Copy Markdown
Contributor

The replacement string used \1 instead of $1 (Trino syntax). In Trino, \1 is interpreted as an escape followed by the literal character 1, so the query was producing 1 instead of the captured domain name.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 29, 2026

CLA assistant check
All committers have signed the CLA.

@piotrrzysko piotrrzysko changed the title Fix Trino REGEXP_REPLACE backreference syntax in Q29 Fix Trino REGEXP_REPLACE backreference syntax Apr 29, 2026
The replacement string used `\1` instead of `$1` (Trino syntax).
In Trino, `\1` is interpreted as an escape followed by the literal
character `1`, so the query was producing `1` instead of the captured
domain name.
@piotrrzysko piotrrzysko force-pushed the fix-trino-regexp_replace branch from 73e9b68 to 0d7b455 Compare April 29, 2026 09:59
@piotrrzysko
Copy link
Copy Markdown
Contributor Author

@alexey-milovidov could you please take a look at this PR?

@rschu1ze rschu1ze merged commit 2aa111d into ClickHouse:main May 4, 2026
@rschu1ze rschu1ze self-assigned this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants